#ifndef SCORE_H
#define SCORE_H
#include <vector>
#include <string>

using namespace std;

class HighScore
{
  string name;
  int score;

public:
  HighScore(string initName, int initScore): name(initName), score(initScore) {}
};


class Score
{
  int score;
  vector<HighScore> highScores;

public:
  //Constructor
  Score(): score(0) {}

  int getScore() {return score;}

  void setScore(int newScore) {score = newScore;}

  //Loads saved HighScores from hard-coded filepath, saves in Vector
  vector<HighScore> load();

  //saves contents of vector to hard-coded file-path
  void save();

  //increments score by int value given to it from Game class
  void updateScore(int newPoints);

  //returns vector of HighScores
  vector<HighScore> getHighScores() {return highScores;}

  //Checks to see if new score is higher than any currently saved, scans highScores.
  bool isNewHighScore(int newScore);

  //Adds new HighScore to vector, resorting and removing lowest score if there are more than 10 HighScores saved
  void addNewHighScore(string newName, int newScore);

};


#endif // SCORE_H
